use FormatMessageW for Windows system error messages#7609
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves Windows error reporting in core/src/xmake/os/strerror.c by using FormatMessageW to retrieve system error messages and converting them to UTF-8. The review feedback suggests refining this implementation by stripping trailing whitespace and newlines from the formatted message, ensuring proper null-termination during UTF-8 conversion, and adding a fallback mechanism if the conversion fails.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
改动前:
改动后: